import { sortEnterprise } from './../../view/customer/manage/configure/api'
import request from '@/utils/request'
// 客户SOP创建
export function CreateCustSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/create',
    method: 'post',
    data
  })
}
//客户SOP查看
export function CustInfo(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/view',
    method: 'post',
    data
  })
}
//客户SOP编辑
export function EditCustSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/edit',
    method: 'post',
    data
  })
}

// 创建客户群sop接口
export function CreateGroupSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/create',
    method: 'post',
    data
  })
}
//修改客户群sop接口
export function UpdateGroupSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/update',
    method: 'post',
    data
  })
}
//客户群sop预览详情
export function GroupSopInfo(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/info',
    method: 'post',
    data
  })
}

//节日列表
export function festivalDay(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/holiday-list',
    method: 'post'
  })
}
// 客户 SOP 列表
export function getSopList(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/list',
    method: 'POST',
    data
  })
}
// SOP 场景
export function scene() {
  return request({
    url: '/scrm-api/console/market/sop/cust/scene-list',
    method: 'POST'
  })
}
// 客户SOP状态修改
export function amendSopStatus(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/update-status',
    method: 'POST',
    data
  })
}
// 客户 SOP 删除
export function delSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/delete',
    method: 'POST',
    data
  })
}
// 客户 SOP 完成情况
export function getFulfilList(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/completion-list',
    method: 'POST',
    data
  })
}
// 客户 SOP 完成情况提醒
export function remindSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/remind',
    method: 'POST',
    data
  })
}
// 客户 SOP 自己完成
export function selfFulfil(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/complete',
    method: 'POST',
    data
  })
}
// 客户 SOP 完成情况预览
export function sopPreview(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/cust/preview',
    method: 'POST',
    data
  })
}
// 客户群 SOP 列表
export function groupSopList(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/getList',
    method: 'POST',
    data
  })
}
// 客户群 SOP 状态修改
export function groupSopStatus(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/updateStatus',
    method: 'POST',
    data
  })
}
// 客户群 SOP 删除
export function delGroupSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/del',
    method: 'POST',
    data
  })
}
// 客户群 SOP 完成列表
export function getGroupFulfilList(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/complete/getlist',
    method: 'POST',
    data
  })
}
// 客户群 SOP 预览
export function previewGroupSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/preview/info',
    method: 'POST',
    data
  })
}
// 客户群 SOP 提醒
export function groupRemindSop(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/remind',
    method: 'POST',
    data
  })
}
export function groupFulfil(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/complete',
    method: 'POST',
    data
  })
}

//根据群主获取客户群数量
export function getGroupNum(data: any) {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/get-groupchat-num',
    method: 'POST',
    data
  })
}
// 客户sop-执行详情
export const carryOut = (data: any) => {
  return request({
    url: '/scrm-api/console/market/sop/cust/rule-list',
    method: 'POST',
    data
  })
}
export const privateRemind = (data: any) => {
  return request({
    url: '/scrm-api/console/market/sop/cust/private-remind',
    method: 'POST',
    data
  })
}
// 客户群sop-执行详情
export const groupSopCarryOut = (data: any) => {
  return request({
    url: '/scrm-api/console/market/sop/groupchat/rule-list',
    method: 'POST',
    data
  })
}

// 群sop-私信提醒
export const GroupPrivate = (data: any) => {
  return request({
    url:  '/scrm-api/console/market/sop/groupchat/private-remind',
    method: 'POST',
    data
  })
}
// 获取高级设置
export const getHeightSet = (data: any) => {
  return request({
    url: '/scrm-api/console/common/get-advanced-setup',
    method: 'GET',
    data
  })
}
